import superRequest from '@/utils/http/index'
import { IDataType } from '@/utils/http/types'

/** 获取模块信息(接口) */
export const apiGetModuleInfo = async (mid: string) => {
  return await superRequest.get<IDataType>({
    url: `/module/info?mid=${mid}`,
  })
}

/** 模块查询(接口) */
export const apiModuleList = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/module/list',
    data,
  })
}

/** 模块新增(接口) */
export const apiModuleAdd = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/module/add',
    data,
  })
}

/** 模块修改(接口) */
export const apiModuleUpdate = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/module/update',
    data,
  })
}

/** 模块删除(接口) */
export const apiModuleDelete = async (data: any) => {
  return await superRequest.post<IDataType>({
    url: '/module/delete',
    data,
  })
}
